package Day6;
import java.util.Random;
public class Demo03Random {

    public static void main(String[]args)
    {
        Random ra=new Random();
        int num=ra.nextInt();
        System.out.println("随机数是"+num);

        Random r=new Random();
        int num2=r.nextInt(5);//0~4的范围
        System.out.println("随机数是"+(num2+1));//1~5的范围
    }

}
